<template name="createIndexOptions">
    {{#if isOptionSelected "NAME"}}
        {{> indexName}}
    {{/if}}
    {{#if isOptionSelected "UNIQUE"}}
        {{> unique}}
    {{/if}}
    {{#if isOptionSelected "SPARSE"}}
        {{> sparse}}
    {{/if}}
    {{#if isOptionSelected "BACKGROUND"}}
        {{> background}}
    {{/if}}
    {{#if isOptionSelected "MAX"}}
        {{> max}}
    {{/if}}
    {{#if isOptionSelected "MIN"}}
        {{> min}}
    {{/if}}
    {{#if isOptionSelected "EXPIRE_AFTER_SECONDS"}}
        {{> expireAfterSeconds}}
    {{/if}}
    {{#if isOptionSelected "DROP_DUPS"}}
        {{> dropDups}}
    {{/if}}
    {{#if isOptionSelected "COLLATION"}}
        {{> collation}}
    {{/if}}
</template>

<template name="dropDups">
    <div class="form-group">
        <label class="col-lg-1 control-label">{{_ "drop_dups"}}</label>
        <div class="col-lg-11">
            <div id="divDropDups" class="i-checks">
                <input id="inputDropDups" type="checkbox" value=""
                       class="form-control"
                       checked=""
                       style="position: absolute; opacity: 0;"/>
                <span class="help-block m-b-none">{{{_ "drop_dups_info"}}}</span>
            </div>
        </div>
    </div>
</template>

<template name="expireAfterSeconds">
    <div class="form-group">
        <label class="col-lg-1 control-label">{{_ "expire"}} {{_ "seconds"}}</label>
        <div class="col-lg-11">
            <input id="inputExpireAfterSeconds" min="0" required="true" type="number" class="form-control">
            <span class="help-block m-b-none">{{{_ "expire_info"}}}</span>
        </div>
    </div>
</template>

<template name="unique">
    <div class="form-group">
        <label class="col-lg-1 control-label">{{_ "unique"}}</label>
        <div class="col-lg-11">
            <div id="divUnique" class="i-checks">
                <input id="inputUnique" type="checkbox" value=""
                       class="form-control"
                       checked=""
                       style="position: absolute; opacity: 0;"/>
            </div>
        </div>
    </div>
</template>

<template name="sparse">
    <div class="form-group">
        <label class="col-lg-1 control-label">{{_ "sparse"}}</label>
        <div class="col-lg-11">
            <div id="divSparse" class="i-checks">
                <input id="inputSparse" type="checkbox" value=""
                       class="form-control"
                       checked=""
                       style="position: absolute; opacity: 0;"/>
            </div>
        </div>
    </div>
</template>

<template name="background">
    <div class="form-group">
        <label class="col-lg-1 control-label">{{_ "background"}}</label>
        <div class="col-lg-11">
            <div id="divBackground" class="i-checks">
                <input id="inputBackground" type="checkbox" value=""
                       class="form-control"
                       checked=""
                       style="position: absolute; opacity: 0;"/>
            </div>
        </div>
    </div>
</template>

<template name="indexName">
    <div class="form-group">
        <label class="col-lg-1 control-label">{{_ "index_name"}}</label>
        <div class="col-lg-11">
            <input type="text" class="form-control" id='inputName'/>
            <span class="help-block m-b-none">{{{_ "index_name_help_block"}}}</span>
        </div>
    </div>
</template>